/**
 * 
 * @author Hyuksoo Seo
 * created Oct 15, 2008
 * copyright 2008 by hs2393@columbia.edu
 */
package edu.columbia.ubms.ejb;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

@Entity
@Table(name="mainpage")
/*
@SequenceGenerator(name = "mainpage_sequence", sequenceName = "mainpage_id_seq")
@TableGenerator(  name="bmainpage_id", table="primary_keys", pkColumnName="key", pkColumnValue="mainpage",
                valueColumnName="value")
*/                 
public class MainPageEntityBean implements Serializable {
     /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private int mainpageId;
	private int userId;
	private int contentId;
	private char contentType;

	public MainPageEntityBean() {
		super();
	};

	public MainPageEntityBean(int userId, int contentId, char contentType) {
		super();
		this.userId = userId;
		this.contentId = contentId;
		this.contentType = contentType;
	}

	@Override
	public String toString() {

			return "MainPage: " + getMainpageId() + " UserID " + getUserId() + " ContentID "
							+ getContentId() + " ContentType " + getContentType();
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public int getMainpageId() {
		return mainpageId;
	}

	public void setMainpageId(int mainpageId) {
		this.mainpageId = mainpageId;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public int getContentId() {
		return contentId;
	}

	public void setContentId(int contentId) {
		this.contentId = contentId;
	}

	public char getContentType() {
		return contentType;
	}

	public void setContentType(char contentType) {
		this.contentType = contentType;
	}
}
